package cn.jobstart.spider.model;

import cn.jobstart.common.StringUtil;
import cn.jobstart.enums.TalentSubscriptionTaskChannelEnum;
import lombok.Data;

import java.util.ArrayList;
import java.util.List;

/**
 * @author sunke
 * @version 1.0
 * @Description
 * @date 2023-10-09 17:18
 */
@Data
public class TalentJob51 extends SourceModel {



    private TalentJob51BaseInfo baseInfo; //基础信息
    private String encryptUserId;
    private TalentJob51ResumeExpectInfo resumeExpectInfo; //期望
    private List<TalentJob51Education> education; //教育经历
    private String isAbnormalResume;

    private TalentJob51RecentWorkInfo recentWorkInfo;//最新工作
    private List<TalentJob51Work> work;//工作经历


    //标识
    private List<String> labelList;

    //页面爬取
    private List<TalentJob51ResumeExpectInfo> resumeExpectInfoList; //期望

    //页面项目经验
    private List<TalentJob51Project> project;

    //页面在校经历
    private List<TalentJob51SchoolJob> schooljob;

    //页面技能/语言
    private List<TalentJob51Itskill> itskill;
    //页面 证书
    private List<TalentJob51Certification> certification;


    public TalentJob51 setRecentWorkInfo(TalentJob51RecentWorkInfo recentWorkInfo) {
        this.recentWorkInfo = recentWorkInfo;
        if (StringUtil.isNotObjEmpty(recentWorkInfo)) {
            if (resumeExpectInfoList == null) {
                resumeExpectInfoList = new ArrayList<>();
            }
            resumeExpectInfoList.add(resumeExpectInfo);
        }
        return this;
    }

    /**
     * 来源
     *
     * @return
     */
    @Override
    public int getSource() {
        return TalentSubscriptionTaskChannelEnum.JOB51.getType().intValue();
    }
}
